<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="css" file="css.nav" />
<import type="js" file="js.jquery" />
<style type="text/css">
a{text-decoration: none; color:#333333;outline: none;}
a:active {outline: none; star:expression(this.onFocus=this.blur());}
</style>
</head>
<body>
    <div class="title_menu">
    	<ul>
    	<volist name="data" id="vo">
        	<li><a href="javascript:void(0)" param="{$i}" onClick="select_job(this,{$vo.menu_id})">{$vo.menu_name}</a></li>
        </volist>
        </ul>
    </div>
    <php>if( !empty($list) ){</php>
    <foreach name="list" item="vo" key="k">
    <div class="title_block" id="main4">
    	<foreach name="vo" item="vo1" key="k1">
    	<div class="fang">
        	<div class="fang_top" param="{$k+1}" id="nav_{$k+1}_{$k1}" onClick="select_category(this,{$vo1.menu_id})">
            	<div class="fang_top_l">{$vo1.menu_name}</div>
            </div>
        </div>
        </foreach>
    </div>
    </foreach>
    <php>}</php>
<script type="text/javascript">
	$(document).ready(function(e) {
		$("#nav_1_0").css('display','inherit');
        select_job($('.title_menu').find('a').eq(0));//默认选中第一个
		//select_category($('.fang_top').eq(0));//默认选中第一个
		//select_now($('.title_last').find('a').eq(0));//默认选中第一个
    });
	
	function select_job(msg,id){
		var param=$(msg).attr('param');
		
		select_category($('.fang_top').eq(0));//初始化
		//select_now($('.title_last').find('a').eq(0));//初始化
		
		
		$('.title_menu li').css('border-bottom','');//清空
		$('.title_menu li').css('background-color','');//清空
		$('.title_menu li').css('font-weight','');//清空
		$('.title_block').css('display','none');
		$('.title_block').eq(param-1).css('display','inherit');
		$(msg).parent().css('border-bottom','solid 1px #333');
		$(msg).parent().css('background-color','#ccc');
		$(msg).parent().css('font-weight','900');

		window.parent.lists.location="__APP__/Public/lists?id="+id;
	}
	
	function select_category(msg,id){
		//select_now($('.title_last').find('a').eq(0));//初始化
		
		//初始化效果
		$('.fang_top').css('background-color','#F2F2F2');
		
		$(msg).next().css('display','inherit');	
		$(msg).css('background-color','#ccc');
		//$(msg).css('font-weight','900');
		$(msg).children().eq(1).css('border-top','4px solid transparent');
		$(msg).children().eq(1).css('border-bottom','4px solid #FFF');
		$(msg).children().eq(1).css('margin-top','16px');
		window.parent.lists.location="__APP__/Public/lists?id="+id;
	}
	
	function select_now(msg){
		$('.title_last').find('a').css('color','#000');
		$(msg).css('color','#F33');	
	}
</script>  
</body>
</html>